1) Field of the Invention
This invention relates to embedding a predetermined code into one color component of image data.
2) Description of the Related Art
As disclosed in drawings of the specification of U.S. Pat. No. 5,636,292 and Japanese Patent Application Laid-Open No. 2000-299779, a technique for embedding a code (different data) into image data or voice data has been conventionally applied to counterfeit forgery, to prevent illegal use, and to provide other services.
Because this technique is used for security purposes, conventional methods have been used against tampering of data. For example, quite complicated methods such as a method of arranging identical codes in an image in a distributed manner, and an electronic watermark technique of inserting a code in a frequency region using FFT (Fast Fourier Transform) have been conventionally used.
The electronic watermark technique is applied to various other services. For example, the drawings of the specification of U.S. Pat. No. 5,841,978 disclose a method of reading an electronic watermark embedded in printed matter and displaying a specific web page.
However, the conventional electronic watermark technique is required to perform an enormous amount of FFT calculation to insert the code into the frequency region. Portable information devices such as a cellular phone, a PHS (Personal Handyphone System), or a PDA (Personal Digital Assistant) include resources, such as a memory and a processor, having limited processing performance. Therefore, in a portable information device, it is difficult to carry out embedding code into and reading out the code from the image data within practical processing time.
Japanese Patent Application Laid-Open No. 2000-165640 discloses an electronic watermark technique that does not perform FFT calculation. The image processing apparatus in this patent literature embeds additional data into Y (yellow) component of image data printed in colors of CMYK (cyan, magenta, yellow, and black).
Specifically, a plurality of patterns are embedded into the Y component image data, which is visually inconspicuous, and a “0” or “1” code is discriminately set depending on the type of pattern embedded. While embedding patterns, if densities of CMK components of the image data are higher, amplitude of pixel value fluctuation of the Y component is set higher. By doing so, even if the densities of the CMK components are high in the printed image, the embedded patterns can be easily detected.
However, reflected wavelengths of the CM components in actual print inks are not reflected wavelengths of pure CM components, but include reflected wavelengths of the Y component as unnecessary reflected wavelengths. Therefore, the prior art disclosed by the Japanese Patent Application Laid-Open No. 2000-165640 has a disadvantage in that the pixel value of the Y component in the actual printed image changes and the change in pixel value adversely affects accuracy of detecting the code from the Y component in the printed image.
Furthermore, at the time of printing the image data, a printer driver adjusts proportions of the CMK components so as to provide a finer image. If the pixel value of the Y component used to embed the code is set based on the densities of the CMK component of the image data, the pixel value of the Y component in the actual printed image further changes due to the adjustment done by the printer driver. As a result, it is difficult to set the pixel value of the Y component that is used to embed the code.
To overcome this problem, the amplitude of the pixel value fluctuation of the Y component may well be set high in advance. However, there is a disadvantage in that the patterns embedded into the image data are conspicuous on the printed image. The prior art disclosed in the Japanese Patent Application Laid-Open No. 2000-165640, therefore, fails to show a specific method of setting appropriate amplitude.
To deal appropriately with the unnecessary reflected wavelengths of the Y component included in the CM components, it is required to adjust the pixel value of the Y component embedded into the code in accordance with color characteristics of the printed image data and not color characteristics of the original image. The same is true for three primary colors RGB (Red, Green, and Blue) complementary to the colors CMY.